#include <stdio.h>
void copy_ptrs(double *target_start, double *source_start, double *source_end){
    while (source_start<=source_end){
        *target_start = *source_start;
        target_start++;
        source_start++;
    }
}
void copy_pos(double *target_start, double *source, int offset, int length){
    copy_ptrs(target_start, source + offset, source + offset + length);
}

int main(){
    double source[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0};
    double target[3];
    copy_pos(target, source, 2, 3);
    return 1;
}

